{% extends 'airshow/base.html' %}

{% block title %}{{ exhibitor.name }} - 参展商详情{% endblock %}

{% block content %}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="{% url 'airshow:index' %}">首页</a></li>
        <li class="breadcrumb-item"><a href="{% url 'airshow:exhibitor_list' %}">参展商列表</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ exhibitor.name }}</li>
    </ol>
</nav>

<div class="card mb-4">
    <div class="card-header">
        <h3>{{ exhibitor.name }}</h3>
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-md-6">
                <p><strong>ID：</strong> {{ exhibitor.exhibitor_id }}</p>
                <p><strong>国家/地区：</strong> {{ exhibitor.country|default:"未知" }}</p>
                <p><strong>展区：</strong> <a href="{% url 'airshow:area_detail' exhibitor.area.area_id %}">{{ exhibitor.area.name }}</a></p>
            </div>
            <div class="col-md-6">
                <p><strong>联系人：</strong> {{ exhibitor.contact_person|default:"未设置" }}</p>
                <p><strong>联系电话：</strong> {{ exhibitor.contact_phone|default:"未设置" }}</p>
                <p><strong>展品数量：</strong> {{ exhibitor.num_exhibits }}</p>
            </div>
        </div>
    </div>
</div>

<div class="card">
    <div class="card-header d-flex justify-content-between align-items-center">
        <h4>展品列表</h4>
    </div>
    <div class="card-body">
        {% if exhibits %}
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>名称</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for exhibit in exhibits %}
                            <tr>
                                <td>{{ exhibit.exhibit_id }}</td>
                                <td>展品{{ exhibit.exhibit_id }}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        {% else %}
            <p class="text-center">该参展商暂无展品</p>
        {% endif %}
    </div>
</div>
{% endblock %}